package API.DAY1;

public class StartsWithDemo {// 判断字符串是否以某个字符串开头或结尾
    public static void main(String[] args) {
        String a = "www.baidu.com";
//        Boolean x = a.startsWith("www");
//        System.out.println(x);
//        Boolean y = a.endsWith("com");
//        System.out.println(y);
        System.out.println(a.startsWith("www"));
        System.out.println(a.endsWith("com"));
    }
}
